package com.css.commonredis.preheat;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author 郭辉
 * @className TODO
 * @description TODO
 * @date 2022/11/9 9:04
 * @company 海康威视
 * @since 1.0.0
 */
@Component
public class DBConfig {

    public static String DB_DIVER;

    public static String DB_URL;

    public static String DB_USER_NAME;

    public static String DB_USER_PASSWORD;

    @Value("${spring.datasource.driver-class-name}")
    public void setDbDiver(String dbDiver) {
        DB_DIVER = dbDiver;
    }

    @Value("${spring.datasource.url}")
    public void setDbUrl(String dbUrl) {
        DB_URL = dbUrl;
    }

    @Value("${spring.datasource.userName}")
    public void setDbUserName(String dbUserName) {
        DB_USER_NAME = dbUserName;
    }

    @Value("${spring.datasource.password}")
    public void setDbUserPassword(String dbUserPassword) {
        DB_USER_PASSWORD = dbUserPassword;
    }
}
